<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <title>12</title>
        <style>
            input[type=text]{
                width: 100%;
                padding: 12px 20px;
                margin: 8px 0;
                box-sizing: border-box;
                border: none;
                border-bottom: 2px solid red;
                border-radius: 4px;
                background-color: #3cbc8d;
                color: white;
                outline: none;
            }
            input[type=text]:focus{
                background-color: lightblue;
            }
        </style>
    </head>
    <body>
        <p>设置文本框的内边距</p>
        <form action="/">
            <label for="name" >name:</label>
            <input type="text" id="name" name="name">
            <label for="newname">newname:</label>
            <input type="text" id="newname" name="newname">

        </form>
    </body>
</html>